package ch.trackedbean.data;

import java.util.*;
import ch.trackedbean.copier.*;
import ch.trackedbean.copier.annotations.*;
import ch.trackedbean.data.evaluator.*;

/**
 * Bean used to test {@link IMappingHolder#getProfile()}.
 * 
 * @author M. Hautle
 */
public class ProfileBean {
    public static final String ATTR_SIMPLE = "simple";

    public static final String ATTR_SIMPLE_B = "simpleB";

    public static final String ATTR_LIST = "list";

    public static final String ATTR_AOTHER_DOM = "aotherDom";

    public static final String ATTR_TEXT = "text";

    /** Property with the same name but mapped to {@link DomB} and not on the source bean ({@link DomB#ATTR_SIMPLE}). */
    @ExternalMapping(value = { DomB.class }, profile = ATTR_SIMPLE)
    private String simple;

    /** Property with different name and located on {@link DomB} ({@link DomB#ATTR_SIMPLE}). */
    @SimpleMapping(value = DomB.ATTR_SIMPLE, srcClass = DomB.class, profile = ATTR_SIMPLE_B)
    private String simpleB;

    /** List mapping of {@link DomC#ATTR_LIST}. A {@link DomEvaluator} will be used to figure out the destination bean types. */
    @CollectionMapping(srcEvaluator = DomEvaluator.class, srcClass = DomC.class, profile = ATTR_LIST)
    private List<TOA> list;

    /**
     * Property mapped on {@link DomD#ATTR_OTHER_DOM}. {@link DomEvaluator} will be used to figure out the TO type of an dom and {@link ToEvaluator} will be
     * used to figure out the dom type of an TO.
     */
    @DeepMapping(srcProperty = DomD.ATTR_OTHER_DOM, srcEvaluator = DomEvaluator.class, dstEvaluator = ToEvaluator.class, srcClass = DomD.class, profile = ATTR_AOTHER_DOM)
    private TOA aotherDom;

    /** Property mapped on {@link DomA#ATTR_TEXT_A} via {@link DomD#ATTR_SUB_DOM}.{@link DomD#ATTR_OTHER_DOM}. */
    @PathMapping(path = DomD.ATTR_SUB_DOM + "." + DomD.ATTR_OTHER_DOM + "." + DomA.ATTR_TEXT_A, lastPathType = DomA.class, srcClass = DomD.class, profile = ATTR_TEXT)
    private String text;

    /**
     * @return Returns the simple.
     */
    public String getSimple() {
        return simple;
    }

    /**
     * @param simple The simple to set.
     */
    public void setSimple(String simple) {
        this.simple = simple;
    }

    /**
     * @return Returns the simpleB.
     */
    public String getSimpleB() {
        return simpleB;
    }

    /**
     * @param simpleB The simpleB to set.
     */
    public void setSimpleB(String simpleB) {
        this.simpleB = simpleB;
    }

    /**
     * @return Returns the list.
     */
    public List<TOA> getList() {
        return list;
    }

    /**
     * @param list The list to set.
     */
    public void setList(List<TOA> list) {
        this.list = list;
    }

    /**
     * @return Returns the aotherDom.
     */
    public TOA getAotherDom() {
        return aotherDom;
    }

    /**
     * @param aotherDom The aotherDom to set.
     */
    public void setAotherDom(TOA aotherDom) {
        this.aotherDom = aotherDom;
    }

    /**
     * @return Returns the text.
     */
    public String getText() {
        return text;
    }

    /**
     * @param text The text to set.
     */
    public void setText(String text) {
        this.text = text;
    }
}
